b363e2c1b3d64ba362a3942700e28cd01569d6d9,portal-impl/test/com/liferay/portlet/wiki/engine/creole/AntlrCreoleParserTests.java,AntlrCreoleParserTests,testParseSimpleImageTag,#,355

Before Change


	}

	public void testParseSimpleImageTag() {
		WikiPageNode root = parseFile(IMAGE_FILES_PREFIX + "image-1.creole");

		Assert.assertNotNull(root);

		ParagraphNode p = (ParagraphNode) root.getChildASTNode(0);
		LineNode line = (LineNode) p.getChildASTNode(0);

		Assert.assertEquals(1, line.getChildASTNodesCount());

		ImageNode image = (ImageNode) line.getChildASTNode(0);

		Assert.assertEquals("link", image.getLink());

		CollectionNode alternativeElements = image.getAltNode();

		Assert.assertNotNull(alternativeElements);
		Assert.assertEquals(1, alternativeElements.size());

		UnformattedTextNode textNode =
			(UnformattedTextNode) alternativeElements.getASTNodes().get(0);
		UnformattedTextNode text =
			(UnformattedTextNode) textNode.getChildASTNode(

After Change


	}

	 public void testParseSimpleImageTag() {
		WikiPageNode wikiPageNode = getWikiPageNode("image-1.creole");

		Assert.assertNotNull(wikiPageNode);

		ParagraphNode paragraphNode =
			(ParagraphNode)wikiPageNode.getChildASTNode(0);

		LineNode lineNode = (LineNode)paragraphNode.getChildASTNode(0);

		Assert.assertEquals(1, lineNode.getChildASTNodesCount());

		ImageNode imageNode = (ImageNode)lineNode.getChildASTNode(0);

		Assert.assertEquals("link", imageNode.getLink());

		CollectionNode collectionNode = imageNode.getAltNode();

		Assert.assertNotNull(collectionNode);
		Assert.assertEquals(1, collectionNode.size());

		List<ASTNode> astNodes = collectionNode.getASTNodes();

		UnformattedTextNode unformattedTextNode =
			(UnformattedTextNode)astNodes.get(0);

		unformattedTextNode =